package org.lab.tracecash.web.rest;

import javax.inject.Inject;
import javax.inject.Provider;
import javax.persistence.EntityManager;

import org.lab.tracecash.common.serialization.Serializer;

public abstract class AbstractRestService {

	@Inject
	protected Provider<EntityManager> entityManagerProvider;
	@Inject
	protected Serializer serializer;

	// TODO esto deberiamos definir a nivel del padre. Reimplementar cuando se integre la seguridad
	protected String getUserName() {
		return "SYSTEM";
	}

	protected EntityManager getManager() {
		return entityManagerProvider.get();
	}
}